package testing;


import java.io.File;
import java.io.FileInputStream;

import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamReader;

public class xml1 {

  public static void main(String[] args) throws Exception {
    File file = new File("/Users/chen/Documents/workspace/TestProcessing/src/resource/material.xml");

    XMLInputFactory inputFactory = XMLInputFactory.newInstance();
    XMLStreamReader reader = inputFactory.createXMLStreamReader(new FileInputStream(file));

    while (reader.getEventType() == 6)
      reader.next();

    int eventTypeID = reader.next();
    System.out.println("Hello " + reader.getText());
  }
}
